package org.demo.quartz.job;

import org.quartz.*;

import java.util.concurrent.TimeUnit;

@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class HelloJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        System.out.println("HelloJob ====================== start");
        try {
            TimeUnit.MINUTES.sleep(3);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("HelloJob ====================== end");
    }
}
